package com.dlc.felear.xiaoensale.activity;

import android.widget.ListView;

import com.dlc.felear.xiaoensale.R;
import com.dlc.felear.xiaoensale.adapter.MenuRecordltemAdapter;
import com.dlc.felear.xiaoensale.dao.MenuRecordInfoDao;
import com.dlc.felear.xiaoensale.deviceUtil.TopbarHelper;
import com.itdlc.android.library.base.BaseActivity;

import butterknife.BindView;

/**
 * 炒菜记录页面
 */
public class MenuRecordInfoActivity extends BaseActivity {

    private static final String TAG="EmnuControlActivity";
    private TopbarHelper topbarHelper;
    @BindView(R.id.lv)
    ListView lv;
    private MenuRecordInfoDao menuRecordInfoDao;
    private MenuRecordltemAdapter adapter;


    @Override
    protected int getLayoutRes() {
        return R.layout.activity_menu_record;
    }

    @Override
    protected void initData() {
        menuRecordInfoDao=new MenuRecordInfoDao(this);
        topbarHelper=new TopbarHelper(this);
        topbarHelper.setcon(R.drawable.arrow_left);
        topbarHelper.setTitle("炒菜记录列表");
        topbarHelper.setNavActivity(LoadDataActivity.class);
        adapter=new MenuRecordltemAdapter(this);
        lv.setAdapter(adapter);
        adapter.setItems(menuRecordInfoDao.queryForAll());
    }

}